package com.regex.web.service.sys.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.regex.web.dao.sys.IUserDAO;
import com.regex.web.dao.sys.IUserRoleDao;
import com.regex.web.entity.sys.UserDTO;
import com.regex.web.entity.sys.UserRoleDTO;
import com.regex.web.service.base.impl.BaseServiceImpl;
import com.regex.web.service.sys.IUserService;

/**
 * <p>
 * 系统用户 服务实现类
 * </p>
 *
 * @author mhy
 * @since 2019-11-19
 */
@Service
public class UserServiceImpl extends BaseServiceImpl<IUserDAO, UserDTO> implements IUserService {
	
	@Autowired
    private IUserRoleDao iUserRoleDao;
	
	public IUserRoleDao getIUserRoleDao() {
        return this.iUserRoleDao;
    }

    public void setIUserRoleDao(IUserRoleDao iUserRoleDao) {
        this.iUserRoleDao = iUserRoleDao;
    }


	@Override
	public UserRoleDTO getUserRoleDTO(Long id) {
		UserRoleDTO obj = new UserRoleDTO();
		obj.setUserId(id);
		UserRoleDTO UserRoleDTO = iUserRoleDao.selectUserRoleDTOByObj(obj);
		return UserRoleDTO;
	}
	
}
